<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/icons-extra.css" />
		<style>
			html,body {
				background-color: #ffffff;
			}
			.title{
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
			
			.font15{
				font-size:15px;
			}
		</style>
		
	</head>

	<body>
		<!--<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title"></h1>
		</header>-->
		<div class="mui-content" id="pullrefresh" style="height: 250px;background-color:#ffffff;" align="center">
			<table border=0 width="95%" height="70%" style="background-color:#ffffff;">
				<tr>
					<td align="center" width="50%" style="border-bottom:deepskyblue solid 1px;border-right:deepskyblue solid 1px ;">
						<span  class="font15">今日订单数</span>
						<br/>
						<span style="font-size: 25px;" id="spanOrderCount">0笔</span>
					</td>
					<td align="center">
						<span  class="font15"><a href="../pay/topay.html">今日营业额</a></span>
						<br/>
						<span style="font-size: 25px;" id="spanDayAmount">¥0.00</span>
					</td>
				</tr>
				
				<tr>
					<td align="center"  width="50%">
						<a href="" id="aBill"><span  class="font15">账单查询</span></a>
					</td>
					<td align="center" style="border-top:deepskyblue solid 1px;border-left:deepskyblue solid 1px ;  ">
						<a href="" id="aCash"><span class="font15" id="spanAmount">账户余额:0.00</span></a>
					</td>
				</tr>
			</table>
			<br/>
			<hr style="border:deepskyblue solid 1px" width="95%"/>
			
			<table border=0 width="95%" height="30%" style="background-color:#ffffff;">
				<tr>
					<td align="center" width="50%" style="border-bottom:deepskyblue solid 1px;border-right:deepskyblue solid 1px ;">
						<a id="aWorkshop" href="#">
		                    <span class="mui-icon-extra mui-icon-extra-hotel" style="font-size: 50px;"></span>
		                    <div class="font15">餐厅设置</div>
						</a>
					</td>
					<td align="center">
						
                      
                        
						<a id="aMenu" href="#">
		                    <span class="mui-icon-extra mui-icon-extra-cate" style="font-size: 50px;"></span>
		                    <div class="font15">餐品管理</div>
						</a>
						
						
						<!--
						<a href="html/menu/menulist.html">
		                    <span class="mui-icon-extra mui-icon-extra-cate" style="font-size: 50px;"></span>
		                    <div class="font15">餐品管理</div>
						</a>
						-->
					</td>
				</tr>
				
				<tr>
					<td align="center"  width="50%">
						<a id="aWorkStat" href="#">
		                    <span class="mui-icon-extra mui-icon-extra-calendar" style="font-size: 50px;"></span>
		                    <div class="font15">营业状态</div>
						</a>
					</td>
					<td align="center" style="border-top:deepskyblue solid 1px;border-left:deepskyblue solid 1px ;  ">
						<a id="aUsers" href="#">
		                    <span class="mui-icon-extra mui-icon-extra-peoples" style="font-size: 45px;"></span>
		                    <div class="font15">用户管理</div>
						</a>
					</td>
				</tr>
				
				<tr>
					<td align="center" style="border-top:deepskyblue solid 1px;" width="50%">
						<a href="#">
							<!--
		                    <span class="mui-icon-extra mui-icon-extra-cold" style="font-size: 45px;"></span>
		                    <div class="font15">打印设置</div>
		                   -->
						</a>
					</td>
					<td align="center" style="border-top:deepskyblue solid 1px;border-left:deepskyblue solid 1px ;  ">
						
					</td>
				</tr>
			</table>
			
		</div>

	</body>
	<script src="../../js/mui.min.js"></script>
	<script src="js/mui.pullToRefresh.js"></script>
	<script src="js/mui.pullToRefresh.material.js"></script>
	<script src="../../js/tools.js"></script>
	<script>
		
		mui.init({
			pullRefresh: {
				container: '#pullrefresh',
				down: {
						style:'circle',
						callback: function()
						{
							setTimeout(function() {
								sespost('/zdm/AppApi/Merchant/GetMerTotalInfo',
									{},
									function(retData)
									{
										document.getElementById("spanAmount").innerHTML = "账户余额:"+retData.amount;
										document.getElementById("spanOrderCount").innerHTML = retData.ordercount +"笔";
										document.getElementById("spanDayAmount").innerHTML = "¥" + retData.dayamount;
								});
								mui('#pullrefresh').pullRefresh().endPulldown();
								mui.toast("已刷新");
							}, 1500);
						}
					}
			}
		});
		
		mui.plusReady(function() 
		{
				sespost('/zdm/AppApi/Merchant/GetMerTotalInfo',
				{},
				function(retData)
				{
					document.getElementById("spanAmount").innerHTML = "账户余额:"+retData.amount;
					document.getElementById("spanOrderCount").innerHTML = retData.ordercount +"笔";
					document.getElementById("spanDayAmount").innerHTML = "¥" + retData.dayamount;
				});
		});
		
		document.getElementById("aBill").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/bill/index.html'});
		});
		
		document.getElementById("aMenu").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/menu/index.html'});
		});
		
		document.getElementById("aWorkshop").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/workshop/index.html'});
		});
		
		document.getElementById("aWorkStat").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/manage/workset.html'});
		});
		
		document.getElementById("aUsers").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/users/index.html'});
		});
		
		document.getElementById("aCash").addEventListener('tap',function () {
			var main = plus.webview.currentWebview().parent();
			mui.fire(main,'gohome',{url:'/html/manage/getcash.html'});
		});
		
		
	</script>
</html>